home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Environments / Small Eiffel 0.4.8 / misc / INSTALL.CSH < prev    next >
Linux/UNIX/POSIX Shell Script  |  1997-04-13  |  2KB  |  63 lines

  1. #!/bin/csh -f
  2. #-- Part of SmallEiffel -- Read DISCLAIMER file -- Copyright (C) 
  3. #-- Dominique COLNET and Suzanne COLLIN -- colnet@loria.fr
  4. #--
  5. #
  6. # To INSTALL SmallEiffel on UNIX like platforms (including LINUX).
  7. #
  8. # If you have the gcc compiler, set the environment variable
  9. # "SmallEiffel" to the appropriate value and simply
  10. # run this INSTALL file (That's all if you have gcc :-).
  11. #
  12. # If you don't have gcc, you must procede manually doing the
  13. # following :
  14. #  - edit and run each SmallEiffel/bin_c/*.make file. Each call
  15. #    to gcc must be changed by a call to your favorite C compiler.
  16. #  - move each executable file in the SmallEiffel/bin directory.
  17. #
  18. # That's all. Good luck :-)
  19. #
  20. # Here the script to run if you have gcc :
  21. if (!($?SmallEiffel)) then
  22.     echo "Environment Variable 'SmallEiffel' not set."
  23.     exit 1
  24. endif
  25. if (! -d $SmallEiffel) then
  26.     echo ${SmallEiffel} "not found."
  27.     exit 1
  28. endif
  29. cd ${SmallEiffel}/bin_c
  30. foreach fmake (*.big)
  31.     set cmd=$fmake:r
  32.     echo Try to run ${fmake}
  33.     source ${fmake} >& /dev/null
  34.     if (!(-f ${cmd})) then
  35.        echo I will install splitted ${cmd} automatically
  36.     else
  37.        echo Unsplitted ${cmd} installed
  38.     endif
  39. end
  40. foreach fmake (*.make)
  41.     set cmd=$fmake:r
  42.     if (!(-f ${cmd})) then
  43.         echo Running ${fmake}
  44.         set verbose=1
  45.         source ${fmake}
  46.     endif
  47.     mv -f ../bin/${cmd} ../bin/${cmd}.old >& /dev/null
  48.     mv -f ${cmd} ../bin/${cmd}
  49.     /bin/rm -f ../bin/${cmd}.old
  50.     unset verbose
  51. end
  52. /bin/rm -f *.o >& /dev/null
  53. echo Setting system name.
  54. echo "UNIX" >! ${SmallEiffel}/sys/system.se
  55. echo Writing default ${SmallEiffel}/sys/loadpath.UNIX
  56. /bin/rm -f ${SmallEiffel}/sys/loadpath.UNIX
  57. echo    "./"                       >  ${SmallEiffel}/sys/loadpath.UNIX
  58. echo    "${SmallEiffel}/lib_std/"  >> ${SmallEiffel}/sys/loadpath.UNIX
  59. echo    "${SmallEiffel}/lib_rand/" >> ${SmallEiffel}/sys/loadpath.UNIX
  60. echo    "${SmallEiffel}/lib_show/" >> ${SmallEiffel}/sys/loadpath.UNIX
  61. echo -n "${SmallEiffel}/lib_test/" >> ${SmallEiffel}/sys/loadpath.UNIX
  62. echo Done.
  63.